//
//
//
//
//
//
//
//
//
//
import icon from '../icon'
import {getColor} from '../utils'
export default {
name: 'mu-avatar',
props: {
backgroundColor: {
type: String,
default: ''
},
color: {
type: String,
default: ''
},
icon: {
type: String,
default: ''
},
src: {
type: String,
default: ''
},
size: {
type: Number
},
iconSize: {
type: Number
}
},
computed: {
style () {
return {
width: this.size ? this.size + 'px' : '',
height: this.size ? this.size + 'px' : '',
color: getColor(this.color),
'background-color': getColor(this.backgroundColor)
}
}
},
methods: {
handleClick () {
this.$emit('click')
}
},
created () {
this._isAvatar = true
},
components: {
icon
}
}
|